﻿namespace GarminConnect
{
    /// <summary>
    /// 体重数据传输对象
    /// </summary>
    public class DateWeight
    {
        public int SamplePk { get; set; }
        public long Date { get; set; }
        public string? CalendarDate { get; set; }
        public double Weight { get; set; }
        public double? Bmi { get; set; }
        public double? BodyFat { get; set; }
        public double? BodyWater { get; set; }
        public double? BoneMass { get; set; }
        public double? MuscleMass { get; set; }
        public double? PhysiqueRating { get; set; }
        public double? VisceralFat { get; set; }
        public double? MetabolicAge { get; set; }
        public string? SourceType { get; set; }
        public long TimestampGMT { get; set; }
        public double WeightDelta { get; set; }
    }

    /// <summary>
    /// 体重数据的总平均值
    /// </summary>
    public class TotalAverage
    {
        public long From { get; set; }
        public long Until { get; set; }
        public double Weight { get; set; }
        public double? Bmi { get; set; }
        public double? BodyFat { get; set; }
        public double? BodyWater { get; set; }
        public double? BoneMass { get; set; }
        public double? MuscleMass { get; set; }
        public double? PhysiqueRating { get; set; }
        public double? VisceralFat { get; set; }
        public double? MetabolicAge { get; set; }
    }

    /// <summary>
    /// 体重数据
    /// </summary>
    public class WeightData
    {
        public string? StartDate { get; set; }
        public string? EndDate { get; set; }
        public List<DateWeight> DateWeightList { get; set; } = new List<DateWeight>();
        public TotalAverage TotalAverage { get; set; } = null!;
    }

    /// <summary>
    /// 更新体重数据
    /// </summary>
    public class UpdateWeight
    {
        public string? DateTimestamp { get; set; }  // 格式示例: "2023-12-31T12:39:00.00"
        public string? GmtTimestamp { get; set; }   // 格式示例: "2023-12-31T20:39:00.00"
        public string? UnitKey { get; set; }        // 例如: "lbs"
        public double Value { get; set; }            // 例如: 202.9
    }

}
